# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=libvncserver
pkgver=0.9.13
pkgrel=1
pkgdesc="Cross-platform C libraries that allow you to easily implement VNC server or client functionality"
arch=('x86_64')
url="https://libvnc.github.io/"
license=('GPL')
depends=('libpng' 'libjpeg' 'gnutls' 'libgcrypt' 'openssl' 'libnsl')
makedepends=('sdl2' 'cmake')
source=("https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${pkgver}.tar.gz")
sha256sums=('0ae5bb9175dc0a602fe85c1cf591ac47ee5247b87f2bf164c16b05f87cbfa81a')

build() {
  cd $pkgname-LibVNCServer-$pkgver
  cmake -DCMAKE_INSTALL_PREFIX=/usr .
  make
}

package() {
  cd $pkgname-LibVNCServer-$pkgver
  make DESTDIR="$pkgdir" install
}
